#include "rsa.h"

/**
 * @briref Calculate greatest common divisor.
 *
 * Process GCD of a and b.
 *
 * @param a First param
 * @param b Second param
 *
 * @return GCD of a and b
 */
t_uint64     gcd(t_uint64 a, t_uint64 b)
{
    t_uint64 r;

    r = 0;
    while (b != 0)
        {
            r = a % b;
            a = b;
            b = r;
        }
    return (a);
}
